/*
 * @Descripttion: 
 * @version: 
 * @Author: afeng510
 * @Date: 2022-09-21 16:51:47
 * @LastEditors: afeng510
 * @LastEditTime: 2022-10-12 15:28:35
 */
function sendPostAjax(url, data, cb) {
    var _headerParams = {}
    var _userToken = localStorage.getItem("token")
    if (_userToken && _userToken != null && _userToken != '') {
        _headerParams['wechatauthorization'] = _userToken
    }

    $.ajax({
        url: url,
        data: JSON.stringify(data),
        type: "POST",
        dataType: "json",
        contentType: "application/json",
        headers: _headerParams,
        success: function (data, status, res) {
            var _token = res.getResponseHeader('wechatauthorization')
            if (_token && _token != null && _token != '') {
                localStorage.setItem("token", _token)
            }

            cb(data)
        }
    })

} 